﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Scala.Compiler.Ast
{
    public enum ModifierFlags:long
    {
        None = 0,

        Implicit = 1<<9,
        Final = 1 << 5,
        Private = 1<<2,
        Protected = 1 << 0,

        Sealed = 1 << 10,
        Override = 1 << 1,
        Case = 1 << 11,
        Abstract = 1 << 3,

        Deferred = 1<<4,
        Interface = 1 << 7,
        Mutable = 1 << 12,
        Param = 1 << 13,
        Macro = 1 << 15,

        Covariant = 1<<16,
        ByNameParam = 1<< 16,
        Contravariant = 1 << 17,
        Absoverride = 1<<18,
        Local = 1<<19,

        Static = 1 << 23,
        Caseaccessor = 1 << 24,
        Trait = 1 << 25,
        Defaultparam = 1 << 25,
        Paramaccessor = 1<< 29,

        Lazy = 1L << 31,
        Presuper = 1L << 37,
        Defaultinit = 1L << 41,
        Artifact = 1L << 46,

        DefaultMethod = 1L << 47,
        Enum = 1L << 48,

        PrivateLocal = Private | Local,
        ProtectedLocal = Protected | Local,
        AccessFlags = Private | Protected | Local,

        Method = 1 << 6,
        Module = 1 << 8,
        Package = 1 << 14,

        Captured = 1 << 16,
        Label = 1 << 17,
        Inconstructor = 1 << 17,
        Synthetic = 1 << 21,
        Stable = 1 << 22,

        Bridge = 1 << 26,
        Accessor = 1 << 27,
        SuperAccessor = 1<< 28,
        ModuleVar = 1<<30,

        Is_Error = 1L << 32,
        Overloaded = 1L << 33,
        Lifted  =1L << 34,
        
        Mixedin = 1L << 35,
        Existential = 1L << 35,
        ExpandedName = 1L << 36,
        ImplClass = 1L << 37,
        Trans_flag = 1L << 38,

        Locked = 1L << 39,
        Specialized = 1L << 40,
        Vbridge = 1L << 42,

        AllFlags = -1L,

        TopLevelCreationFlags = Module | Package | Final,

        PackageFlags = TopLevelCreationFlags,
        ModuleFlags =Module,

        ExplicitFlags = Private|Protected|Abstract|Final|Sealed|Override|Case|Implicit|Absoverride|Lazy|DefaultMethod,

        FieldFlags = Mutable|Caseaccessor|Paramaccessor|Static|Final|Presuper|Lazy,
    };
}
